#pragma once
#include "../AtomicType.h"
#include "../TermVariable.h"
#include "../TermSet.h"

class DoubleFunctionSet : public TermSet{

public:

	Token::pointer Ty_Boolean;
	Token::pointer Te_False;
	Token::pointer Te_True;
	Token::pointer Te_And;
	Token::pointer Te_Not;
	Token::pointer Te_Or;

	Token::pointer Ty_Double;
	Token::pointer Te_Plus;
	Token::pointer Te_Minus;
	Token::pointer Te_Mult;
	Token::pointer Te_Div;
	Token::pointer Te_Gt;
	Token::pointer Te_St;
	Token::pointer Te_Eq;
	Token::pointer Te_Slope;
	vector<Token::pointer> Constants;


	
protected:
	void initTypes();
	void initNumbers();
	void initBooleans();
	void initBooleanOperators();
	void initBinaryFunctions( );

public:
	virtual ~DoubleFunctionSet();
	DoubleFunctionSet(){
		initTypes();  
		initNumbers();
		initBooleans();
		initBooleanOperators();
		initBinaryFunctions( );
		
	
		/*	 
			
			
			
		
			insert(_TERM(*(Plus = new TermVariable(_TYPE(*TDDDouble), "+")))); 
			insert(_TERM(*(Minus = new TermVariable(_TYPE(*TDDDouble), "-")))); 
			
			insert(*(TBool = new AbstractType(_TYPE(*TDDDouble), _TYPE(*TDouble))));	
			
			
	

		

			TermVariable Temp1(_TYPE(*TBool));
			TermVariable Temp2(_TYPE(*TBool));
			ApplicationTerm Temp3 (ApplicationTerm(ApplicationTerm(Temp1, *TBool), Temp2), *False);
			And = new  AbstractTerm(AbstractTerm(Temp3,	Temp2), Temp1);
			insert(*And);



			/*
		
			ArrowType TInttoInt(TInt, TInt, I);
			ArrowType TInttoBool(TInt, TBool);
			ArrowType TBooltoBool(TBool, TBool);
			ArrowType TBooltoTBooltoBool(TBool, TBooltoBool);
			ArrowType TInttoInttoBool(TInt, TInttoBool,"COMPARE");
			ArrowType TInttoInttoInttoBool(TInt, TInttoInttoBool);
			GoalType =	 TInttoInt.clone();


			ArrowType TInttoInttoInt(TInt,TInttoInt);
			ArrowType TBooltoInttoInttoInttoInt(TBool,TInttoInttoInt, ">");

			insert(TermVariable(TInttoInttoInt, "*")); 
			insert(TermVariable(TInttoInttoInt, "/"));
			insert(TermVariable(TInttoInttoInt, "mod")); 
			insert(TermVariable(TInttoInttoInt,"plus")); 
			insert(TermVariable(TInttoInttoInt,"minus")); 
	
			/*
			insert(TermVariable(TIn"-1")); 
			insert(TermVariable("0",TInt)); 
			insert(TermVariable("1",TInt)); 
			insert(TermVariable("2",TInt)); 
			insert(TermVariable("0.25",TInt));

			insert(TermVariable("false",TBool)); 
			insert(TermVariable("true",TBool)); 

			insert(TermVariable("if",TBooltoInttoInttoInttoInt)); 
			insert(TermVariable("if",ArrowType(TBool, ArrowType(TInttoInt, ArrowType(TInttoInt, TInttoInt))))); 
			insert(TermVariable("if",ArrowType(TBool, ArrowType(TBool, ArrowType(TBool, TBool))))); 

			insert(TermVariable("and",TBooltoTBooltoBool)); 
		    insert(TermVariable("or",TBooltoTBooltoBool)); 
			insert(TermVariable("not",TBooltoBool)); 

			insert(TermVariable("lt",TInttoInttoBool)); 
			insert(TermVariable("gt",TInttoInttoBool)); 
			insert(TermVariable("eq",TInttoInttoBool));	 */
	};



};





